package com.huixh.train.batch.client;

import com.huixh.train.batch.client.fallback.BusinessClientFallBack;
import com.huixh.train.common.resp.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.Date;

/**
 * @author huixh
 */
@FeignClient(name = "train-business",path = "/business",fallback = BusinessClientFallBack.class)
public interface BusinessClient {

    /**
     * 生成每日车次
     * @param date 日期
     * @return result
     */
    @GetMapping("/admin/dailyTrain/gen-daily/{date}")
    Result<String> genDaily(@PathVariable(name = "date") @DateTimeFormat(pattern = "yyyy-MM-dd") Date date);

    /**
     *
     * @return
     */
    @GetMapping("/fegin/test/hello")
    Result<String> sendHello();

}
